home *** CD-ROM | disk | FTP | other *** search
- global gIVEndFrame
-
- on PlayClip clipID, mon, pauseIt
- global givState, givCONTROLPANELSPRITE, givBASEMONITORSPRITE, givMAINMONITORSPRITE, gSIEventQ, gSIFlush, givLastRollover, givPlayingQSL, gSIHWnd, gSIShowWindow, gSISystem
- DisableIdleAnim()
- if pauseIt = #play then
- set the activeVideoMode of givState to #play
- if the mode of givState = #play then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode pause button"
- updateStage()
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "pause button"
- updateStage()
- end if
- DVIdle()
- MyDVPlay(clipID)
- DVIdle()
- else
- set the activeVideoMode of givState to #pause
- if the mode of givState = #play then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button"
- updateStage()
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button"
- end if
- MyDVPlay(clipID)
- DVPause()
- end if
- DVIdle()
- repeat while the mouseDown
- DVIdle()
- end repeat
- gSIShowWindow(mCall, gSIHWnd, 5)
- StartBufferingEvents()
- MessagePut("entering the play clip loop")
- set flashTime to the ticks
- repeat while (the activeVideoMode of givState = #play) or (the activeVideoMode of givState = #pause)
- if the activeVideoMode of givState = #play then
- DVIdle()
- end if
- if (the activeVideoMode of givState = #pause) and not rollOver(givCONTROLPANELSPRITE + 9) and (the ticks > (flashTime + 30)) then
- if the mode of givState = #play then
- if the castNum of sprite (givCONTROLPANELSPRITE + 9) = the number of cast "play mode play button" then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button" + 1
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button"
- end if
- updateStage()
- set flashTime to the ticks
- else
- if the castNum of sprite (givCONTROLPANELSPRITE + 9) = the number of cast "play button" then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button" + 1
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button"
- end if
- updateStage()
- set flashTime to the ticks
- end if
- end if
- if not (the mouseDown) then
- set rollsprite to 997
- if the mode of givState = #edit then
- if rollOver(givCONTROLPANELSPRITE + 8) and (count(the questionSelectList of givState) > 0) and (givPlayingQSL = 1) then
- set rollsprite to givCONTROLPANELSPRITE + 8
- set the castNum of sprite (givCONTROLPANELSPRITE + 8) to the number of cast "next button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 8) and (count(the editList of givState) > 0) and (givPlayingQSL = 0) then
- set rollsprite to givCONTROLPANELSPRITE + 8
- set the castNum of sprite (givCONTROLPANELSPRITE + 8) to the number of cast "next button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 9) and (the activeVideoMode of givState = #play) then
- set rollsprite to givCONTROLPANELSPRITE + 9
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "pause button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 9) and (the activeVideoMode of givState = #pause) then
- set rollsprite to givCONTROLPANELSPRITE + 9
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 10) then
- set rollsprite to givCONTROLPANELSPRITE + 10
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "stop button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 11) and (count(the questionSelectList of givState) > 0) and (givPlayingQSL = 1) then
- set rollsprite to givCONTROLPANELSPRITE + 11
- set the castNum of sprite (givCONTROLPANELSPRITE + 11) to the number of cast "previous button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 11) and (count(the editList of givState) > 0) and (givPlayingQSL = 0) then
- set rollsprite to givCONTROLPANELSPRITE + 11
- set the castNum of sprite (givCONTROLPANELSPRITE + 11) to the number of cast "previous button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollsprite = 997 then
- ResetRollover(rollsprite)
- updateStage()
- end if
- if the activeVideoMode of givState = #play then
- DVIdle()
- end if
- end if
- if the mode of givState = #play then
- if rollOver(givCONTROLPANELSPRITE + 8) and (count(the questionSelectList of givState) > 0) and (givPlayingQSL = 1) then
- set rollsprite to givCONTROLPANELSPRITE + 8
- set the castNum of sprite (givCONTROLPANELSPRITE + 8) to the number of cast "play mode next button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 8) and (count(the editList of givState) > 0) and (givPlayingQSL = 0) and (the activeMonitor of givState = 3) then
- set rollsprite to givCONTROLPANELSPRITE + 8
- set the castNum of sprite (givCONTROLPANELSPRITE + 8) to the number of cast "play mode next button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 9) and (the activeVideoMode of givState = #play) then
- set rollsprite to givCONTROLPANELSPRITE + 9
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode pause button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 9) and (the activeVideoMode of givState = #pause) then
- set rollsprite to givCONTROLPANELSPRITE + 9
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 10) then
- set rollsprite to givCONTROLPANELSPRITE + 10
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "play mode stop button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 11) and (count(the questionSelectList of givState) > 0) and (givPlayingQSL = 1) then
- set rollsprite to givCONTROLPANELSPRITE + 11
- set the castNum of sprite (givCONTROLPANELSPRITE + 11) to the number of cast "play mode previous button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollOver(givCONTROLPANELSPRITE + 11) and (count(the editList of givState) > 0) and (givPlayingQSL = 0) and (the activeMonitor of givState = 3) then
- set rollsprite to givCONTROLPANELSPRITE + 11
- set the castNum of sprite (givCONTROLPANELSPRITE + 11) to the number of cast "play mode previous button" + 1
- ResetRollover(rollsprite)
- updateStage()
- end if
- if rollsprite = 997 then
- ResetRollover(rollsprite)
- updateStage()
- end if
- if the activeVideoMode of givState = #play then
- DVIdle()
- end if
- end if
- else
- set ret to EMPTY
- set ev to EMPTY
- if the activeVideoMode of givState = #play then
- DVIdle()
- end if
- set mc to the mouseCast
- if mc = the castNum of sprite (givCONTROLPANELSPRITE + 8) then
- if (count(the questionSelectList of givState) > 0) and (givPlayingQSL = 1) then
- MessagePut("skip to next clip -- playclipnext")
- if the mode of givState = #edit then
- set the castNum of sprite (givCONTROLPANELSPRITE + 8) to the number of cast "next button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 8) to the number of cast "play mode next button"
- end if
- updateStage()
- PlayClipNext()
- if the activeVideoMode of givState = #stop then
- EndBufferingEvents()
- if the mode of givState = #play then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "play mode stop button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "stop button"
- updateStage()
- end if
- return 1
- exit
- end if
- end if
- if (count(the editList of givState) > 0) and (givPlayingQSL = 0) then
- MessagePut("go to next clip in edit list")
- if the mode of givState = #edit then
- set the castNum of sprite (givCONTROLPANELSPRITE + 8) to the number of cast "next button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 8) to the number of cast "play mode next button"
- end if
- updateStage()
- PlayEditNext()
- if the activeVideoMode of givState = #stop then
- EndBufferingEvents()
- if the mode of givState = #play then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "play mode stop button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "stop button"
- updateStage()
- end if
- return 1
- exit
- end if
- end if
- end if
- if mc = the castNum of sprite (givCONTROLPANELSPRITE + 10) then
- EndBufferingEvents()
- DVStop()
- if the mode of givState = #play then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "play mode stop button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "stop button"
- updateStage()
- end if
- set the activeVideoMode of givState to #stop
- return 1
- exit
- end if
- if mc = the castNum of sprite (givCONTROLPANELSPRITE + 9) then
- if the activeVideoMode of givState = #play then
- if the mode of givState = #play then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button"
- updateStage()
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button"
- updateStage()
- end if
- DVPause()
- MessagePut("pause clip")
- set the activeVideoMode of givState to #pause
- else
- if the mode of givState = #play then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode pause button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "pause button"
- end if
- updateStage()
- DVResume()
- MessagePut("resume clip")
- set the activeVideoMode of givState to #play
- DVIdle()
- end if
- end if
- if mc = the castNum of sprite (givCONTROLPANELSPRITE + 11) then
- if (count(the questionSelectList of givState) > 0) and (givPlayingQSL = 1) then
- if the mode of givState = #edit then
- set the castNum of sprite (givCONTROLPANELSPRITE + 11) to the number of cast "previous button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 11) to the number of cast "play mode previous button"
- end if
- updateStage()
- MessagePut("skip to previous clip -- playclipprevious")
- PlayClipPrevious()
- if the activeVideoMode of givState = #stop then
- EndBufferingEvents()
- if the mode of givState = #play then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "play mode stop button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "stop button"
- end if
- updateStage()
- return 1
- exit
- end if
- end if
- if (count(the editList of givState) > 0) and (givPlayingQSL = 0) then
- MessagePut("go to next clip in edit list")
- if the mode of givState = #edit then
- set the castNum of sprite (givCONTROLPANELSPRITE + 11) to the number of cast "previous button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 11) to the number of cast "play mode previous button"
- end if
- updateStage()
- PlayEditPrevious()
- if the activeVideoMode of givState = #stop then
- EndBufferingEvents()
- if the mode of givState = #play then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "play mode stop button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "stop button"
- updateStage()
- end if
- return 1
- exit
- end if
- end if
- end if
- repeat while the mouseDown
- DVIdle()
- end repeat
- end if
- if the activeVideoMode of givState = #pause then
- nothing()
- else
- if DVGetPos() >= gIVEndFrame then
- set the activeVideoMode of givState to #stop
- DVStop()
- end if
- end if
- if the activeVideoMode of givState = #play then
- DVIdle()
- end if
- end repeat
- EndBufferingEvents()
- set the activeVideoMode of givState to #stop
- if the mode of givState = #play then
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play mode play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "play mode stop button"
- else
- set the castNum of sprite (givCONTROLPANELSPRITE + 9) to the number of cast "play button"
- set the castNum of sprite (givCONTROLPANELSPRITE + 10) to the number of cast "stop button"
- updateStage()
- end if
- return 0
- end
-
- on MyDVPlay clipID
- global givVideoLookupList, givLastClipPlayed, gSISystem, gSIVideoPath, givMAINMONITORSPRITE
- set Frames to getaProp(givVideoLookupList, clipID)
- if voidp(Frames) then
- MessagePut("error: clip not found in video lookup list")
- exit
- end if
- if gSISystem = "MAC" then
- MessagePut("playing clip" && clipID & ": frames" && item 3 of Frames && item 4 of Frames)
- DVPlay(2 * value(item 3 of Frames), 2 * value(item 4 of Frames))
- set gIVEndFrame to 2 * value(item 4 of Frames)
- else
- MessagePut("playing clip" && clipID & ": frames" && item 1 of Frames && item 2 of Frames)
- DVPlay(item 1 of Frames, item 2 of Frames)
- set gIVEndFrame to item 2 of Frames
- end if
- DVShow()
- end
-